February 17, 2023, 2:33 pm
##Log into Exchange Online
Connect-ExchangeOnline
##Must be deleted inbox, view all deleted inboxes with `Get-Mailbox -SoftDeletedMailbox`
$from = "bogus@email.com"
##Must be normal exhcange inbox.
$to = "new-bogus@email.com"
##Getting Exhcange Object IDs
$fromID = Get-Mailbox -SoftDeletedMailbox -Identity $from | select ExchangeObjectId
$toID = Get-Mailbox -Identity $to | select ExchangeObjectId
##Uncomment to run. be sure you have all the above information correct!
#New-MailboxRestoreRequest -SourceMailbox $fromID -TargetMailbox $toID -TargetRootFolder "Imported"
#New-MailboxRestoreRequest -SourceMailbox $fromID -TargetMailbox $toID
##Verify/Monitor copy progress.
$ident = Get-MailboxRestoreRequest | select Identity
Get-MailboxRestoreRequestStatistics $ident.Identity
##good to disconnect
Disconnect-ExchangeOnline